package cn.iocoder.yudao.module.shop.dal.mysql.handlestrategyuser;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.shop.dal.dataobject.handlestrategyuser.ShopHandleStrategyUserDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.shop.controller.admin.handlestrategyuser.vo.*;

/**
 * 艾灸师绑定的工资策略 Mapper
 *
 * @author 曹建伟
 */
@Mapper
public interface ShopHandleStrategyUserMapper extends BaseMapperX<ShopHandleStrategyUserDO> {

    default PageResult<ShopHandleStrategyUserDO> selectPage(ShopHandleStrategyUserPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ShopHandleStrategyUserDO>()
                .eqIfPresent(ShopHandleStrategyUserDO::getUserId, reqVO.getUserId())
                .eqIfPresent(ShopHandleStrategyUserDO::getTenantId, reqVO.getTenantId())
                .betweenIfPresent(ShopHandleStrategyUserDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ShopHandleStrategyUserDO::getId));
    }

    default List<ShopHandleStrategyUserDO> selectList(ShopHandleStrategyUserExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<ShopHandleStrategyUserDO>()
                .eqIfPresent(ShopHandleStrategyUserDO::getUserId, reqVO.getUserId())
                .betweenIfPresent(ShopHandleStrategyUserDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ShopHandleStrategyUserDO::getId));
    }

}
